<?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.LinearLayoutCompat
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical">

    <FrameLayout
        android:id="@+id/msg_frame"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <androidx.cardview.widget.CardView
            android:id="@+id/msg_card"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginBottom="4dp"
            android:layout_marginEnd="8dp"
            android:layout_marginStart="8dp"
            android:layout_marginTop="4dp"
            app:cardBackgroundColor="@color/outMessageColor"
            app:cardCornerRadius="12dp">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:orientation="vertical">

                <TextView
                    android:id="@+id/msg_author"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginEnd="8dp"
                    android:layout_marginStart="8dp"
                    android:layout_marginTop="4dp"
                    android:fontFamily="sans-serif-medium"
                    android:text="Author name"
                    android:textColor="@color/white"
                    android:visibility="gone"
                    android:maxWidth="220dp"
                    tools:ignore="HardcodedText" />

                <LinearLayout
                    android:id="@+id/flow_container"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="vertical"
                    android:visibility="gone"
                    tools:visibility="visible">

                    <Space
                        android:id="@+id/container_space"
                        android:layout_width="match_parent"
                        android:layout_height="4dp"
                        android:visibility="gone" />

                    <dev.tinelix.jabwave.ui.views.AttachFlowLayout
                        android:id="@+id/flow_layout"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:background="@color/backgroundDark"
                        android:gravity="center"
                        app:weightDefault="1.0">

                        <ImageView
                            android:id="@+id/photo_example_1"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            tools:srcCompat="@drawable/photo_example_1" />

                        <ImageView
                            android:id="@+id/photo_example_2"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            tools:srcCompat="@drawable/photo_example_2" />

                        <ImageView
                            android:id="@+id/photo_example_3"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            app:srcCompat="@drawable/photo_example_3" />

                    </dev.tinelix.jabwave.ui.views.AttachFlowLayout>

                </LinearLayout>

                <LinearLayout
                    android:id="@+id/message_text_area"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_marginBottom="4dp"
                    android:layout_marginEnd="8dp"
                    android:layout_marginStart="8dp"
                    android:layout_marginTop="4dp">

                    <dev.tinelix.jabwave.ui.views.base.TightTextView
                        android:id="@+id/msg_text"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:autoLink="web"
                        android:maxWidth="220dp"
                        android:text="Message text"
                        android:textColor="@color/white"
                        android:textSize="16sp"
                        android:visibility="visible" />

                    <TextView
                        android:id="@+id/msg_timestamp"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_gravity="bottom"
                        android:layout_marginStart="6dp"
                        android:layout_weight="1"
                        android:gravity="end"
                        android:minWidth="20dp"
                        android:text="9:50"
                        android:textColor="@color/msgTimestampColor"
                        android:textSize="12sp" />

                </LinearLayout>

            </LinearLayout>

        </androidx.cardview.widget.CardView>
    </FrameLayout>
</androidx.appcompat.widget.LinearLayoutCompat>